package com.vo;



import com.bean.dangBean.Balance;

import java.io.Serializable;
import java.text.SimpleDateFormat;

public class BalanceVo implements Serializable {
    /** 编号 */
    private String id;
    /** 余额 */
    private String balance;
    /** 时间 */
    private String time;



    public Balance parse() {

        Balance balance = new Balance();

        try {
            balance.setId(Integer.valueOf(this.id));
        } catch (Exception e) {
//            e.printStackTrace();
        }
        try {
            balance.setBalance(Double.valueOf(this.balance));
        } catch (Exception e) {
//            e.printStackTrace();
        }

        try {
            balance.setTime(new SimpleDateFormat("yyyy-MM-dd").parse(this.time));
        } catch (Exception e) {
//            e.printStackTrace();
        }

        return balance;
    }

    public BalanceVo() {
    }

    public BalanceVo(String id, String balance, String time) {
        this.id = id;
        this.balance = balance;
        this.time = time;
    }

    public BalanceVo(String balance, String time) {
        this.balance = balance;
        this.time = time;
    }

    @Override
    public String toString() {
        return "BalanceVo{" +
                "id='" + id + '\'' +
                ", balance='" + balance + '\'' +
                ", time='" + time + '\'' +
                '}';
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getBalance() {
        return balance;
    }

    public void setBalance(String balance) {
        this.balance = balance;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }
}



